<div class="box box-solid no-margin box-show">
    <div class="box-body">
        <h4>基本信息</h4>
        <div class="box-body table-responsive no-padding">
            <table class="table">
                <thead>
                <tr>
                    <th width="10%">发货单号</th>
                    <th>建单人</th>
                    <th>订单号</th>
                    <th>发货站点</th>
                    <th>发货时间</th>
                    <th>状态</th>
                    <th>物流状态</th>
                    <th>物流单号</th>
                    <th>到货时间</th>
                    <th>运费</th>
                    <th width="15%">备注</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>{{ $delivery->delivery_no }}</td>
                    <td>{{ \App\Util\User::getUsernameById($delivery->seller_id) }}</td>
                    <td>{{ $delivery->order_no }}</td>
                    <td>{{ $delivery->area->area ?? '' }}</td>
                    <td>{{ $delivery->delivered_at ?? '' }}</td>
                    <td>{{ $delivery->status <= 5 ? \App\Models\CustomerDelivery\CustomerDelivery::$_status[$delivery->status] : '' }}</td>
                    <td>{{ \App\Models\CustomerDelivery\CustomerDelivery::$_logisticsStatus[$delivery->logistics_status] }}</td>
                    <td>{{ $delivery->logistics->tracking_no ?? '' }}</td>
                    <td>{{ $delivery->logistics->arrived_at ?? '' }}</td>
                    <td>{{ $delivery->logistics->shipping_fee ?? '' }}</td>
                    <td>{{ $delivery->remarks ?? '' }}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div class="box box-solid no-margin box-show">
    <div class="box-body">
        <h4>收货人信息</h4>
        <div class="box-body table-responsive no-padding">
            <table class="table">
                <thead>
                <tr>
                    <th>国家</th>
                    <th>收货人</th>
                    <th>收货地址</th>
                    <th>州</th>
                    <th>城市</th>
                    <th>邮编</th>
                    <th>电话</th>
                    <th>税号</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>{{ $delivery->receiver->country ?? '' }}</td>
                    <td>{{ $delivery->receiver->receiver ?? '' }}</td>
                    <td>{{ $delivery->receiver->address ?? '' }}</td>
                    <td>{{ $delivery->receiver->state ?? '' }}</td>
                    <td>{{ $delivery->receiver->city ?? '' }}</td>
                    <td>{{ $delivery->receiver->postcode ?? '' }}</td>
                    <td>{{ $delivery->receiver->phone ?? '' }}</td>
                    <td>{{ $delivery->receiver->cpf ?? '' }}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div class="box box-solid no-margin box-show">
    <div class="box-body">
        <h4>产品信息</h4>
        <div class="box-body table-responsive no-padding">
            <table class="table">
                <thead>
                <tr>
                    <th>SKU总数</th>
                    <th>产品总件数</th>
                    <th>实发总件数</th>
                    <th>发货公斤数</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>{{ $delivery->total_sku }}</td>
                    <td>{{ $delivery->total_unit }}</td>
                    <td>{{ $delivery->ship_total_unit }}</td>
                    <td>{{ $delivery->logistics->total_weight ?? '' }}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div class="box box-solid no-margin box-show">
    <div class="box-body">
        <h4>物流信息</h4>
        <div class="box-body table-responsive no-padding">
            <table class="table">
                <thead>
                <tr>
                    <th>物流公司</th>
                    <th>物流渠道</th>
                    <th>追踪号</th>
                    <th>发货公斤数</th>
                    <th>运费</th>
                    <th>到货日期</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>{{ \App\Models\Basics\ExpressCompany::getNameById($delivery->logistics->express_company_id ?? null) }}</td>
                    <td>{{ \App\Models\Basics\ExpressChannel::getNameById($delivery->logistics->express_channel_id ?? null) }}</td>
                    <td>{{ $delivery->logistics->tracking_no ?? '' }}</td>
                    <td>{{ $delivery->logistics->total_weight ?? '' }}</td>
                    <td>{{ $delivery->logistics->shipping_fee ?? '' }}</td>
                    <td>{{ $delivery->logistics->arrived_at ?? '' }}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
